/* if this is a link, this branch should point towards its destination */
if (branch->link != NULL)
r = atan2(branch->link->y - branch->prev->y, branch->link->x - branch->prev->x);
else r = frand(0, M_PI * 2.0); /* not a link, random direction */
m = 1.5 / (float)branch->level;
/* m==scaling factor r==azimuthal angle */
branch->x = branch->prev->x + cos(r) * m;
branch->y = branch->prev->y + sin(r) * m;
branch->z = branch->prev->z + m;
return self;
}
/* be helpful */
- (char *)help:window :browser
{
return ("TreeCoord - Steve Ludtke May 1992\n\nThis is the original view of gopherspace. Each site is drawn as a tree (branches get smaller the higher you go)\n");